import { dataCompanyAxios, dataQueryAxios } from '@/utils/request.ts'

// 表头简介
export const getCompanyInfoOverviewIntroduction = (params: any): Promise<any> => {
  return dataCompanyAxios({
    url: '/companyInfo/overview/introduction' + '/' + params.companyCode,
    method: 'get',
    params
  })
}

// 收藏
export const collectCompany = (data: any): Promise<any> => {
  return dataQueryAxios({
    url: `/api/data-query/v1/favorites/companies`,
    method: 'post',
    data
  })
}
// 取消收藏
export const cancelCompanycollect = (id: any): Promise<any> => {
  return dataQueryAxios({
    url: `/api/data-query/v1/favorites/companies/${id}`,
    method: 'delete'
  })
}

export const favorCompanyList = (params: { page: number; page_size: number }) => {
  return dataQueryAxios({
    url: '/api/data-query/v1/favorites/companies',
    method: 'get',
    params
  })
}

// 导出报告
export const getExportCompanyReport = (data: any): Promise<any> => {
  return dataCompanyAxios({
    url: '/companyReport/generateReport',
    method: 'post',
    data
  })
}

export const getExportTaxReport = (data: any): Promise<any> => {
  return dataCompanyAxios({
    url: '/companyReport/taxReportCheck',
    method: 'post',
    data
  })
}
